<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>方便面价格：2.23元</li>
    </ul>
    <script>
        let goods = [
            {
                name:'方便面',
                price: 2.234,
            },
            {
                name:'飘柔',
                price: 22.25,
            },
            {
                name:'钢丝球',
                price: 5,
            }
        ]
        document.querySelector('ul').innerHTML = goods.map((item)=>
        `<li>${item.name}价格：${item.price.toFixed(2)}元</li>`).join('')
    </script>
</body>
</html>